#!/bin/sh
HERE=`pwd`
TARGETS='hardy intrepid jaunty'
#REVISION=`echo $BUILD_NUMBER | sed -e 's/:.*$//'`
REVISION=$BUILD_NUMBER
MAJOR=`sed -e 's/\.${revision}//' bld/version.txt`
rm -fr output/build
mkdir -p output/build
cd output/build
cp ../linux/mono/2.0/Debug/icudotnet-src-$MAJOR.$REVISION.tar.gz libicu-cil_$MAJOR.$REVISION.orig.tar.gz
mkdir libicu-cil-$MAJOR.$REVISION
cd libicu-cil-$MAJOR.$REVISION
tar xzf ../libicu-cil_$MAJOR.$REVISION.orig.tar.gz
cp -r ../../../debian-src debian
export DEBSIGN_KEYID="mono teamcity"
dch -v $MAJOR.$REVISION-1sil1 "Daily Build"
/home/mono/bin/mpdebuild --vadd .%d --distrib "$TARGETS" --configfile /home/mono/pbuilder/pbuilderrc-%d-new --auto-debsign
#/home/mono/bin/mpdebuild --vadd .%d --distrib "$TARGETS" --use-pdebuild-internal --configfile /home/mono/pbuilder/pbuilderrc-%d-new --auto-debsign
/home/mono/bin/mdput -d ~/pbuilder/results -t PALASO- -f icudotnet_$MAJOR.$REVISION\*.changes $TARGETS
